import java.util.*;

public class Test {
    public List<String> topKFrequent(String[] words, int k) {
        HashMap<String,Integer> map = new HashMap<>();
        for (String word:words) {
            if(map.containsKey(word)){
                int val = map.get(word);
                map.put(word,val+1);
            }else {
                map.put(word,1);
            }
        }
        //建立小根堆, 调整比较器
        PriorityQueue<Map.Entry<String,Integer>> priorityQueue = new PriorityQueue<>(new Comparator<Map.Entry<String, Integer>>() {
            @Override
            public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
                if(o1.getValue().compareTo(o2.getValue()) == 0){
                    return o2.getKey().compareTo(o1.getKey());
                }
                return o1.getValue().compareTo(o2.getValue());
            }
        });
        //遍历map
        for (Map.Entry<String,Integer> entry:map.entrySet()) {
            if(priorityQueue.size()<k){
                priorityQueue.offer(entry);
            }else {//小根堆创建好了,该判断剩下元素了
                Map.Entry<String,Integer> top = priorityQueue.peek();//Map.Entry<String,Integer>类型
                if(top.getValue().compareTo(entry.getValue())<0){
                    priorityQueue.poll();
                    priorityQueue.offer(entry);
                }else if(top.getValue().compareTo(entry.getValue())==0){
                    if(top.getKey().compareTo(entry.getKey())>0){//比较字典序, 字典序小的放进小根堆
                        priorityQueue.poll();
                        priorityQueue.offer(entry);
                    }
                }
            }
        }
        //逆置
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0;i<k;i++){
            Map.Entry<String,Integer> top = priorityQueue.poll();
            list.add(top.getKey());
        }
        Collections.reverse(list);
        return list;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(a + b);
        }
    }
    public static void func(String str_m,String str_s){
        str_m = str_m.toUpperCase();
        str_s = str_s.toUpperCase();
        HashSet<Character> setM = new HashSet<>();
        for (int i = 0; i < str_m.length() ;i++) {
            char ch = str_m.charAt(i);
            setM.add(ch);
        }
        HashSet<Character> setS = new HashSet<>();
        for (int i = 0; i < str_s.length(); i++) {
            char ch = str_s.charAt(i);
            setS.add(ch);
        }
        HashSet<Character> setN = new HashSet<>();
        for (char x:setM) {
            if (!setS.contains(x)&&!setN.contains(x)){
                setN.add(x);
                System.out.print(x);
            }
        }

    }
    public int numJewelsInStones(String jewels, String stones) {
        char[] ch = jewels.toCharArray();
        char[] ch2 = stones.toCharArray();
        int count = 0;
        HashSet<Character> set = new HashSet<>();
        for (char c:ch) {
            set.add(c);
        }
        for (char c2:ch2) {
            if(set.contains(c2)){
                count++;
            }
        }

        return count;
    }






    class Node{
        int val;
        Node next;
        Node random;

        public Node(int val) {
            this.val = val;
            this.next = null;
            this.random = null;
        }


    }
    public Node copyRandomList(Node head) {
        TreeMap<Node,Node> map = new TreeMap<>((node1, node2) -> {
            // 自定义比较逻辑（比如按节点的某个属性比较）
            return node1.val - node2.val;
        });
        Node cur = head;
        while (cur!=null){//第一次遍历, 创建结点, 并且将对应结点的地址放入map中
            Node node = new Node(cur.val);
            map.put(cur,node);
            cur = cur.next;
        }
        cur = head;
        while (cur!=null){
            map.get(cur).next = map.get(cur.next);
            map.get(cur).random = map.get(cur.random);
            cur = cur.next;
        }
        return map.get(head);
    }
    public int singleNumber(int[] nums) {
        HashMap<Integer,Integer> map = new HashMap<>();
        for (int x:nums) {//遍历数组, 将元素放入map中, 遇到重复元素取出来
            if (map.containsKey(x)){
                map.remove(x);
            }else {
                map.put(x,1);
            }

        }
        for (int x:nums) {//再次遍历数组 , 如果数组元素包含在map中 , 则返回
            if(map.containsKey(x)){
                return x;
            }
        }
        return -1;
    }
    public int singleNumber_set(int[] nums){
        HashSet<Integer> set = new HashSet<>();
        for (int x:nums) {
            if(set.contains(x)){//包含该元素则删除该元素
                set.remove(x);
            }else {
                set.add(x);
            }

        }
        for (int x:nums) {
            if(set.contains(x)){
                return x;
            }
        }
        return -1;
    }
}
